$(function(){
	$("#loginForm").submit(function(){
        $.ajax({
            url:url.login,
            type:"post",
            dataType:"json",
            contentType:"application/json",
            data:JSON.stringify({
                "userName":$("#userName").val(),
                "passWord":$("#passWord").val()
            }),
            success:function(resp){
                if(resp.code==0){
                    let token = resp.token
                    localStorage.setItem("token",token)
//                    $("#demo").text(token)
                      window.login.toOrderPage()
                }
            }
        })
        return false
	})
})